/*     */ package com.zimbra.qa.unittest;
/*     */ 
/*     */ import com.zimbra.common.service.ServiceException;
/*     */ import com.zimbra.common.util.Log;
/*     */ import com.zimbra.common.util.Log.Level;
/*     */ import com.zimbra.common.util.StringUtil;
/*     */ import com.zimbra.common.util.ZimbraLog;
/*     */ import com.zimbra.cs.account.Account;
/*     */ import com.zimbra.cs.db.DbPool;
/*     */ import com.zimbra.cs.db.DbPool.DbConnection;
/*     */ import com.zimbra.cs.index.ZimbraHit;
/*     */ import com.zimbra.cs.mailbox.Conversation;
/*     */ import com.zimbra.cs.mailbox.Flag;
/*     */ import com.zimbra.cs.mailbox.Flag.FlagInfo;
/*     */ import com.zimbra.cs.mailbox.Folder;
/*     */ import com.zimbra.cs.mailbox.MailItem.Type;
/*     */ import com.zimbra.cs.mailbox.Mailbox;
/*     */ import com.zimbra.cs.mailbox.MailboxManager;
/*     */ import com.zimbra.cs.mailbox.Message;
/*     */ import com.zimbra.cs.mailbox.Mountpoint;
/*     */ import com.zimbra.cs.mailbox.Tag;
/*     */ import com.zimbra.cs.service.util.ItemId;
/*     */ import com.zimbra.cs.stats.ZimbraPerf;
/*     */ import java.util.HashSet;
/*     */ import java.util.Iterator;
/*     */ import java.util.List;
/*     */ import java.util.Set;
/*     */ import junit.framework.TestCase;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class TestTags
/*     */   extends TestCase
/*     */ {
/*     */   private DbPool.DbConnection mConn;
/*     */   private Mailbox mMbox;
/*     */   private Account mAccount;
/*     */   private String remoteUser;
/*     */   private Mountpoint mountpoint;
/*  58 */   private static String TAG_PREFIX = "TestTags";
/*  59 */   private static String MSG_SUBJECT = "Test tags";
/*     */   
/*     */   private Message mMessage1;
/*     */   private Message mMessage2;
/*     */   private Message mMessage3;
/*     */   private Message mMessage4;
/*     */   private Conversation mConv;
/*  66 */   private Tag[] mTags = new Tag[0];
/*     */   
/*     */ 
/*     */ 
/*     */   protected void setUp()
/*     */     throws Exception
/*     */   {
/*  73 */     ZimbraLog.test.debug("TestTags.setUp()");
/*  74 */     super.setUp();
/*     */     
/*  76 */     this.remoteUser = ("test.tags.user@" + TestUtil.getDomain());
/*  77 */     this.mAccount = TestUtil.getAccount("user1");
/*  78 */     this.mMbox = MailboxManager.getInstance().getMailboxByAccount(this.mAccount);
/*  79 */     this.mConn = DbPool.getConnection();
/*     */     
/*     */ 
/*  82 */     cleanUp();
/*     */     
/*  84 */     this.mMessage1 = TestUtil.addMessage(this.mMbox, MSG_SUBJECT + " 1");
/*  85 */     this.mMessage2 = TestUtil.addMessage(this.mMbox, MSG_SUBJECT + " 2");
/*  86 */     this.mMessage3 = TestUtil.addMessage(this.mMbox, MSG_SUBJECT + " 3");
/*  87 */     this.mMessage4 = TestUtil.addMessage(this.mMbox, MSG_SUBJECT + " 4");
/*     */     
/*  89 */     this.mConv = this.mMbox.getConversationById(null, this.mMessage1.getConversationId());
/*  90 */     refresh();
/*     */   }
/*     */   
/*     */ 
/*     */   public void testManyTags()
/*     */     throws Exception
/*     */   {
/*  97 */     boolean runTest = false;
/*  98 */     if (!runTest) {
/*  99 */       return;
/*     */     }
/*     */     
/* 102 */     int numPrepares = ZimbraPerf.getPrepareCount();
/*     */     
/*     */ 
/*     */ 
/* 106 */     int numTags = 256 - this.mMbox.getTagList(null).size();
/* 107 */     assertTrue("Can't create any new tags", numTags != 0);
/*     */     
/*     */ 
/* 110 */     this.mTags = new Tag[numTags];
/* 111 */     for (int i = 0; i < this.mTags.length; i++) {
/* 112 */       this.mTags[i] = this.mMbox.createTag(null, TAG_PREFIX + (i + 1), 0);
/*     */     }
/* 114 */     refresh();
/*     */     
/*     */ 
/* 117 */     for (int i = 0; i < this.mTags.length; i++) {
/* 118 */       this.mMbox.alterTag(null, this.mMessage1.getId(), this.mMessage1.getType(), this.mTags[i].getName(), true, null);
/* 119 */       refresh();
/*     */     }
/*     */     
/* 122 */     numPrepares = ZimbraPerf.getPrepareCount() - numPrepares;
/* 123 */     ZimbraLog.test.debug("testManyTags generated %d SQL statements.", new Object[] { Integer.valueOf(numPrepares) });
/*     */   }
/*     */   
/*     */   public void testRemoveTag() throws Exception
/*     */   {
/* 128 */     this.mTags = new Tag[4];
/* 129 */     for (int i = 0; i < this.mTags.length; i++) {
/* 130 */       this.mTags[i] = this.mMbox.createTag(null, TAG_PREFIX + (i + 1), 0);
/*     */     }
/* 132 */     refresh();
/*     */     
/* 134 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), this.mTags[0].getName(), true, null);
/*     */     
/* 136 */     Set<Integer> ids = search("tag:" + this.mTags[0].getName(), MailItem.Type.MESSAGE);
/* 137 */     assertEquals("1: result size", 1, ids.size());
/* 138 */     assertTrue("1: no message 1", ids.contains(new Integer(this.mMessage2.getId())));
/*     */     
/* 140 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), this.mTags[0].getName(), false, null);
/*     */     
/*     */ 
/* 143 */     ids = search("tag:" + this.mTags[0].getName(), MailItem.Type.MESSAGE);
/* 144 */     assertEquals("0: result size", 0, ids.size());
/*     */   }
/*     */   
/*     */   public void testNonExistentTagSearch() throws Exception
/*     */   {
/* 149 */     Set<Integer> ids = search("tag:nonexistent", MailItem.Type.MESSAGE);
/* 150 */     assertEquals("search for tag:nonexistent result size", 0, ids.size());
/*     */   }
/*     */   
/*     */   public void testTagSearch()
/*     */     throws Exception
/*     */   {
/* 156 */     this.mTags = new Tag[4];
/* 157 */     for (int i = 0; i < this.mTags.length; i++) {
/* 158 */       this.mTags[i] = this.mMbox.createTag(null, TAG_PREFIX + (i + 1), 0);
/*     */     }
/* 160 */     refresh();
/*     */     
/*     */ 
/* 163 */     this.mMbox.alterTag(null, this.mConv.getId(), this.mConv.getType(), this.mTags[0].getName(), true, null);
/* 164 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), this.mTags[0].getName(), false, null);
/* 165 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), this.mTags[0].getName(), false, null);
/* 166 */     this.mMbox.alterTag(null, this.mMessage4.getId(), this.mMessage4.getType(), this.mTags[0].getName(), false, null);
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 173 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), this.mTags[1].getName(), true, null);
/* 174 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), this.mTags[1].getName(), true, null);
/* 175 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), this.mTags[2].getName(), true, null);
/* 176 */     refresh();
/*     */     
/*     */ 
/* 179 */     Set<Integer> ids = search("tag:" + this.mTags[0].getName(), MailItem.Type.MESSAGE);
/* 180 */     assertEquals("1: result size", 1, ids.size());
/* 181 */     assertTrue("1: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/*     */     
/*     */ 
/* 184 */     ids = search("tag:" + this.mTags[0].getName() + " or tag:" + this.mTags[1].getName(), MailItem.Type.MESSAGE);
/* 185 */     assertEquals("2a: result size", 3, ids.size());
/* 186 */     assertTrue("2a: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 187 */     assertTrue("2a: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 188 */     assertTrue("2a: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/*     */     
/*     */ 
/* 191 */     ids = search("tag:" + this.mTags[1].getName() + " tag:" + this.mTags[2].getName(), MailItem.Type.MESSAGE);
/* 192 */     assertEquals("2b: result size", 1, ids.size());
/* 193 */     assertTrue("2b: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/*     */     
/*     */ 
/* 196 */     ids = search("not tag:" + this.mTags[0].getName(), MailItem.Type.MESSAGE);
/* 197 */     assertFalse("3: message 1 found", ids.contains(new Integer(this.mMessage1.getId())));
/* 198 */     assertTrue("3: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 199 */     assertTrue("3: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 200 */     assertTrue("3: no message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 203 */     ids = search("not tag:" + this.mTags[1].getName() + " not tag:" + this.mTags[2].getName(), MailItem.Type.MESSAGE);
/* 204 */     assertTrue("4: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 205 */     assertFalse("4: contains message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 206 */     assertFalse("4: contains message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 207 */     assertTrue("4: no message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 210 */     ids = search("tag:" + this.mTags[1].getName() + " not tag:" + this.mTags[2].getName(), MailItem.Type.MESSAGE);
/* 211 */     assertFalse("5: message 1 found", ids.contains(new Integer(this.mMessage1.getId())));
/* 212 */     assertTrue("5: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 213 */     assertFalse("5: contains message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 214 */     assertFalse("5: contains message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 217 */     ids = search("tag:" + this.mTags[3].getName(), MailItem.Type.MESSAGE);
/* 218 */     assertEquals("6: search should have returned no results", 0, ids.size());
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */   public void testRemoteTagSearch()
/*     */     throws Exception
/*     */   {
/* 226 */     Account remoteAcct = TestUtil.createAccount(this.remoteUser);
/* 227 */     remoteAcct = TestUtil.getAccount(this.remoteUser);
/* 228 */     Mailbox remoteMbox = MailboxManager.getInstance().getMailboxByAccount(remoteAcct);
/* 229 */     remoteMbox.grantAccess(null, 2, this.mAccount.getId(), (byte)1, (short)7, null);
/*     */     
/* 231 */     this.mountpoint = this.mMbox.createMountpoint(null, 1, "remoteInbox", remoteAcct.getId(), 2, null, MailItem.Type.MESSAGE, Flag.ID_CHECKED, (byte)2, false);
/*     */     
/* 233 */     Message remoteMsg1 = TestUtil.addMessage(remoteMbox, MSG_SUBJECT + " in shared inbox tagged with shared TAG");
/* 234 */     Message remoteMsg2 = TestUtil.addMessage(remoteMbox, MSG_SUBJECT + " in shared inbox tagged remOnly");
/* 235 */     Tag[] remoteTags = new Tag[2];
/* 236 */     remoteTags[0] = remoteMbox.createTag(null, TAG_PREFIX + 1, 0);
/* 237 */     remoteTags[1] = remoteMbox.createTag(null, TAG_PREFIX + "remOnly", 0);
/* 238 */     this.mTags = new Tag[2];
/* 239 */     for (int i = 0; i < this.mTags.length; i++) {
/* 240 */       this.mTags[i] = this.mMbox.createTag(null, TAG_PREFIX + (i + 1), 0);
/*     */     }
/* 242 */     refresh();
/* 243 */     remoteMbox.alterTag(null, remoteMsg1.getId(), remoteMsg1.getType(), remoteTags[0].getName(), true, null);
/* 244 */     remoteMbox.alterTag(null, remoteMsg2.getId(), remoteMsg2.getType(), remoteTags[1].getName(), true, null);
/* 245 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), this.mTags[0].getName(), true, null);
/* 246 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), this.mTags[1].getName(), true, null);
/* 247 */     Folder sharedFolder = this.mMbox.getFolderByName(null, 1, "remoteInbox");
/* 248 */     sharedFolder.getId();
/* 249 */     List<ZimbraHit> hits = TestUtil.searchForHits(this.mMbox, String.format("tag:\"%s\" (inid:%d OR is:local)", new Object[] { this.mTags[0].getName(), Integer.valueOf(sharedFolder.getId()) }), MailItem.Type.MESSAGE);
/*     */     
/*     */ 
/* 252 */     assertEquals("Search for tag present in both local and remote mboxes.  Number of hits returned", 2, hits.size());
/* 253 */     boolean gotLocalHit = false;
/* 254 */     boolean gotRemoteHit = false;
/* 255 */     ZimbraLog.test.setLevel(Log.Level.trace);
/* 256 */     for (ZimbraHit hit : hits) {
/* 257 */       ZimbraLog.test.info("HIT %s", new Object[] { hit.getParsedItemID() });
/* 258 */       ItemId parsedId = hit.getParsedItemID();
/* 259 */       if ((parsedId.belongsTo(this.mAccount)) && (hit.getItemId() == this.mMessage2.getId())) {
/* 260 */         gotLocalHit = true;
/*     */       }
/* 262 */       if ((parsedId.belongsTo(remoteAcct)) && (hit.getItemId() == remoteMsg1.getId())) {
/* 263 */         gotRemoteHit = true;
/*     */       }
/*     */     }
/* 266 */     assertTrue("1st search should return one local hit", gotLocalHit);
/* 267 */     assertTrue("1st search should return one remote hit", gotRemoteHit);
/*     */     
/* 269 */     Set<Integer> ids = search(String.format("tag:\"%s\" (inid:%d OR is:local)", new Object[] { this.mTags[1].getName(), Integer.valueOf(sharedFolder.getId()) }), MailItem.Type.MESSAGE);
/*     */     
/*     */ 
/* 272 */     assertEquals("Search for tag not present in remote mbox. Number of ids returned", 1, ids.size());
/* 273 */     assertTrue("2nd search should contain message 3", ids.contains(new Integer(this.mMessage3.getId())));
/*     */   }
/*     */   
/*     */   public void testFlagSearch() throws Exception
/*     */   {
/* 278 */     this.mMbox.alterTag(null, this.mConv.getId(), this.mConv.getType(), Flag.FlagInfo.REPLIED, true, null);
/* 279 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), Flag.FlagInfo.REPLIED, false, null);
/* 280 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), Flag.FlagInfo.REPLIED, false, null);
/* 281 */     this.mMbox.alterTag(null, this.mMessage4.getId(), this.mMessage4.getType(), Flag.FlagInfo.REPLIED, false, null);
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 288 */     this.mMbox.alterTag(null, this.mMessage2.getId(), this.mMessage2.getType(), Flag.FlagInfo.FLAGGED, true, null);
/* 289 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), Flag.FlagInfo.FLAGGED, true, null);
/* 290 */     this.mMbox.alterTag(null, this.mMessage3.getId(), this.mMessage3.getType(), Flag.FlagInfo.FORWARDED, true, null);
/* 291 */     refresh();
/*     */     
/*     */ 
/* 294 */     Set<Integer> ids = search("is:replied", MailItem.Type.MESSAGE);
/* 295 */     assertTrue("1: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 296 */     assertFalse("1: message 2 found", ids.contains(new Integer(this.mMessage2.getId())));
/* 297 */     assertFalse("1: message 3 found", ids.contains(new Integer(this.mMessage3.getId())));
/* 298 */     assertFalse("1: message 4 found", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 301 */     ids = search("is:flagged is:forwarded", MailItem.Type.MESSAGE);
/* 302 */     assertFalse("2a: message 1 found", ids.contains(new Integer(this.mMessage1.getId())));
/* 303 */     assertFalse("2a: message 2 found", ids.contains(new Integer(this.mMessage2.getId())));
/* 304 */     assertTrue("2a: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 305 */     assertFalse("2a: message 4 found", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 308 */     ids = search("is:replied or is:flagged", MailItem.Type.MESSAGE);
/* 309 */     assertTrue("2b: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 310 */     assertTrue("2b: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 311 */     assertTrue("2b: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 312 */     assertFalse("2b: message 4 found", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/*     */ 
/* 316 */     ids = search("not is:replied", MailItem.Type.MESSAGE);
/* 317 */     assertFalse("3: contains message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 318 */     assertTrue("3: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 319 */     assertTrue("3: no message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 320 */     assertTrue("3: no message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 323 */     ids = search("not is:flagged not is:forwarded", MailItem.Type.MESSAGE);
/* 324 */     assertTrue("4: no message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 325 */     assertFalse("4: contains message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 326 */     assertFalse("4: contains message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 327 */     assertTrue("4: no message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */     
/*     */ 
/* 330 */     ids = search("is:flagged not is:forwarded", MailItem.Type.MESSAGE);
/* 331 */     assertFalse("5: contains message 1", ids.contains(new Integer(this.mMessage1.getId())));
/* 332 */     assertTrue("5: no message 2", ids.contains(new Integer(this.mMessage2.getId())));
/* 333 */     assertFalse("5: contains message 3", ids.contains(new Integer(this.mMessage3.getId())));
/* 334 */     assertFalse("5: contains message 4", ids.contains(new Integer(this.mMessage4.getId())));
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void testSearchUnreadAsTag()
/*     */     throws Exception
/*     */   {
/* 349 */     boolean unseenSearchSucceeded = false;
/*     */     try {
/* 351 */       search("tag:\\Unseen", MailItem.Type.MESSAGE);
/* 352 */       unseenSearchSucceeded = true;
/*     */     } catch (ServiceException e) {
/* 354 */       assertEquals("Unexpected exception type", "mail.INVALID_NAME", e.getCode());
/*     */     }
/* 356 */     assertFalse("tag:\\Unseen search should not have succeeded", unseenSearchSucceeded);
/*     */     
/* 358 */     Set<Integer> isUnreadIds = search("is:unread", MailItem.Type.MESSAGE);
/* 359 */     Set<Integer> tagUnreadIds = search("tag:\\Unread", MailItem.Type.MESSAGE);
/* 360 */     if (!isUnreadIds.containsAll(tagUnreadIds)) {
/* 361 */       fail("Mismatch in search results.  is:unread returned (" + StringUtil.join(",", isUnreadIds) + "), tag:\\Unread returned (" + StringUtil.join(",", tagUnreadIds) + ")");
/*     */     }
/*     */   }
/*     */   
/*     */   private Set<Integer> search(String query, MailItem.Type type)
/*     */     throws Exception
/*     */   {
/* 368 */     List<Integer> ids = TestUtil.search(this.mMbox, query, type);
/* 369 */     return new HashSet(ids);
/*     */   }
/*     */   
/*     */   private void refresh() throws Exception
/*     */   {
/* 374 */     if (this.mMessage1 != null) {
/* 375 */       this.mMessage1 = this.mMbox.getMessageById(null, this.mMessage1.getId());
/*     */     }
/* 377 */     if (this.mMessage2 != null) {
/* 378 */       this.mMessage2 = this.mMbox.getMessageById(null, this.mMessage2.getId());
/*     */     }
/* 380 */     if (this.mMessage3 != null) {
/* 381 */       this.mMessage3 = this.mMbox.getMessageById(null, this.mMessage3.getId());
/*     */     }
/* 383 */     if (this.mMessage4 != null) {
/* 384 */       this.mMessage4 = this.mMbox.getMessageById(null, this.mMessage4.getId());
/*     */     }
/* 386 */     if (this.mConv != null) {
/* 387 */       this.mConv = this.mMbox.getConversationById(null, this.mConv.getId());
/*     */     }
/* 389 */     for (int i = 0; i < this.mTags.length; i++) {
/* 390 */       this.mTags[i] = this.mMbox.getTagById(null, this.mTags[i].getId());
/*     */     }
/*     */   }
/*     */   
/*     */   protected void tearDown() throws Exception
/*     */   {
/* 396 */     ZimbraLog.test.debug("TestTags.tearDown()");
/*     */     
/* 398 */     cleanUp();
/*     */     
/* 400 */     DbPool.quietClose(this.mConn);
/* 401 */     super.tearDown();
/*     */   }
/*     */   
/*     */   private void cleanUp() throws Exception {
/* 405 */     Set<Integer> messageIds = search("subject:\"Test tags\"", MailItem.Type.MESSAGE);
/* 406 */     for (Iterator i$ = messageIds.iterator(); i$.hasNext();) { int id = ((Integer)i$.next()).intValue();
/* 407 */       this.mMbox.delete(null, id, MailItem.Type.MESSAGE);
/*     */     }
/*     */     
/* 410 */     List<Tag> tags = this.mMbox.getTagList(null);
/* 411 */     if (tags == null) {
/* 412 */       return;
/*     */     }
/*     */     
/* 415 */     for (Tag tag : tags) {
/* 416 */       if (tag.getName().startsWith(TAG_PREFIX)) {
/* 417 */         this.mMbox.delete(null, tag.getId(), tag.getType());
/*     */       }
/*     */     }
/* 420 */     if (this.mountpoint != null) {
/*     */       try {
/* 422 */         this.mMbox.delete(null, this.mountpoint.getId(), MailItem.Type.MOUNTPOINT);
/*     */       }
/*     */       catch (Exception e) {}
/* 425 */       this.mountpoint = null;
/*     */     }
/*     */     try {
/* 428 */       TestUtil.deleteAccount(this.remoteUser);
/*     */     }
/*     */     catch (Exception e) {}
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/qa/unittest/TestTags.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */